﻿using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
namespace WPFExcelReport
{
    public partial class TAE11
    { 
        public TAE11()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VAPARTE();
            this.DataContext = MV;
            InitializeComponent();
        } 
        public override void OnEXAUFChg(string vlaue)
        {
            TBMain.Clear();
            if (EXAUF.Length < 48)
                return;
            dwData = TBMain.NewRow();
            dwData["APAEMANDANT"] = app.Mandant;
            dwData["APAEANRKRS"] = " AND APAEANRKRS='" + EXAUF.Substring(0,2) + "'";
            dwData["APAEALFDNR"] = " AND APAEALFDNR='"+ EXAUF.Substring(2, 6)+"'";
            dwData["APAEAFOLGE"] = " AND APAEAFOLGE='" + EXAUF.Substring(8, 3) + "'";
            dwData["APAEAEVOR"] = " AND APAEAEVOR='" + EXAUF.Substring(11, 4) + "'";
            SResult = TMV.QKSZ03(dwData);
            MergeData(SResult, false); 
            base.OnEXAUFChg(vlaue);
        } 
    }
}
